package com.ssm.maven.core.entity;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class MenuBean {

    private String title;//左侧菜单标题

    private String icon;//左侧菜单图标

    private String href;//左侧菜单地址

    private String spread;//左侧菜单是否展开

    private List<MenuBean> children;//子菜单

    public void addChildren(MenuBean bean) {
        this.children.add(bean);
    }

    public MenuBean(String title, String icon, String href, String spread) {
        this.title = title;
        this.icon = icon;
        this.href = href;
        this.spread = spread;
        this.children = new ArrayList<MenuBean>();
    }

}
